package oktx.thread;

import com.arjuna.ats.internal.arjuna.thread.ThreadActionData;
import com.arjuna.ats.jta.TransactionManager;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.stereotype.Component;

import javax.transaction.Transaction;

/**
 * Created by dave on 18-5-29 下午9:25.
 */
@Component
@ConditionalOnClass(TransactionManager.class)
public class NarayanaTxThreadDetach implements TransactionThreadDetach {

    @Override
    public void detach(Transaction transaction) {
        ThreadActionData.popAction();
    }

}
